package com.lq.whattoeattoday.Enum;

public enum TypeEnum
{
    jiachangcai("jiachangcai", 1, "简餐菜"),
    chuancai("chuancai", 2, "川菜");

    private String name;
    private Integer type;

    private String title;

    public String getName()
    {
        return name;
    }

    public void setName(String name)
    {
        this.name = name;
    }

    public Integer getType()
    {
        return type;
    }

    public void setType(Integer type)
    {
        this.type = type;
    }

    public String getTitle()
    {
        return title;
    }

    public void setTitle(String title)
    {
        this.title = title;
    }

    TypeEnum(String name, Integer type, String title)
    {
        this.name = name;
        this.type = type;
        this.title = title;
    }

    public static String getTypeName(Integer type)
    {
        TypeEnum[] values = TypeEnum.values();
        for (TypeEnum value : values)
        {
            if (value.type == type)
            {
                return value.name;
            }
        }
        return null;
    }
}
